πŸ•ΈοΈ Ada Research Browser

README.md
← Back

Cloud Demo Infrastructure (Spec 007)

This directory provides on-demand cloud infrastructure for the 4-node demo lab using Terraform + Hetzner Cloud.

What It Provisions

Prerequisites

All other tools (Terraform, Ansible, hcloud CLI) are bundled in a Docker image that builds automatically on first run.

Hetzner Setup

  1. Create a project in Hetzner Cloud Console
  2. Generate an API token (Security β†’ API Tokens β†’ Generate API Token)
  3. Configure credentials using .env file (recommended):
cd infra
cp .env.example .env
# Edit .env and add your HCLOUD_TOKEN

Or export directly:

export HCLOUD_TOKEN="<your-token>"

Optional overrides (in .env or environment):

TF_VAR_location="hil"          # default: hil (Hillsboro)
TF_VAR_ttl_hours="4"           # default: 4
TF_VAR_ssh_key_path="~/.ssh/id_ed25519.pub"

Commands

From repo root (/Users/kellycaylor/dev/rcd-cui):

make demo-cloud-up
make demo-cloud-status
make demo-cloud-down

Behavior:

Cost Model

Approximate Hetzner cost (Hillsboro):

TTL warning is set to 4h by default and is shown on subsequent cloud commands when exceeded.

Running Existing Demo Scenarios

Use the generated cloud inventory while keeping existing playbooks unchanged:

cd /Users/kellycaylor/dev/rcd-cui/demo/vagrant
export ANSIBLE_INVENTORY=../../infra/terraform/inventory.yml

ansible-playbook ../playbooks/scenario-a-onboard.yml
ansible-playbook ../playbooks/scenario-b-drift.yml
ansible-playbook ../playbooks/scenario-c-audit.yml
ansible-playbook ../playbooks/scenario-d-lifecycle.yml

Inventory details:

Workshop Attendee Access

After cluster provisioning:

  1. Collect attendee public keys
  2. Append keys on login01
ssh root@<login01-public-ip>
cat >> /root/.ssh/authorized_keys <<'EOF_KEYS'
ssh-ed25519 AAAA... attendee1
ssh-ed25519 AAAA... attendee2
EOF_KEYS
  1. Share login node IP with attendees

Compute nodes remain private-only and are reached through management/login workflow.

Docker Image

All tools run inside a Docker container. The image builds automatically on first make demo-cloud-* command.

Rebuild the image manually (after Dockerfile changes):

make demo-docker-build

Image contents:

Troubleshooting

Docker is not installed or Docker daemon is not running

Install and start Docker Desktop, then retry.

HCLOUD_TOKEN is not set

Add token to infra/.env:

cp infra/.env.example infra/.env
# Edit .env and add your HCLOUD_TOKEN

No SSH public key found

On first run, you'll be prompted to generate a dedicated demo SSH key. Accept the prompt, or provide your own key:

# Option 1: Accept the prompt to generate infra/.ssh/demo_ed25519
# Option 2: Set in .env
TF_VAR_ssh_key_path=~/.ssh/id_ed25519.pub

Cluster already exists

make demo-cloud-down

Ansible provisioning fails

Re-run just the provisioning step:

./infra/scripts/docker-run.sh ansible-playbook \
  -i infra/terraform/inventory.yml \
  demo/playbooks/provision.yml

Compute nodes are unreachable directly

They do not have public IPs by design. Use ProxyJump:

ssh -J root@<mgmt01-public-ip> root@10.0.0.31
ssh -J root@<mgmt01-public-ip> root@10.0.0.32